ActionController::Routing::Routes.draw do |map|

	map.root :controller => 'home', :action => 'index'
	#:id = cat3Id_itemId
	map.item '/item/:id', :controller => 'item', :action => 'show', :requirements => {:id => /\d+_\d+/}
	map.item_list '/item/list/:cid/*props', :controller => 'list', :action => 'index', :cid=>nil
	map.keyword '/item/keywords/:word/:categories', :controller=>'list', :action =>'search_by_keywords',:categories=>nil
	
	map.nick 'item/nick/:nick',:controller=>'list',:action=>'index'
	
	map.redirect '/to_gbk/:q', :controller=>'list',:action=>'to_gbk'
	#*props = cid_props_keyword
	map.item_search '/item/search/*props', :controller => 'list', :action => 'index'
	map.item_statistic '/item_statistic/:item_id', :controller => 'item_statistic', :action => 'create'
	
	map.nvzhuang '/nvzhuang',:controller =>'list',:action =>'index'
	map.hanban '/hanban',:controller =>'list',:action =>'hanban'
	map.nvqun '/nvqun/:categories', :controller =>'list', :action=>'nvqun', :categories=>[50010850,1623]
  map.nvku '/nvku/:categories', :controller=>'list',:action=>'nvku',:categories=>[162205,1622]
  #admin 
  map.admin_xx2 '/admin_xx2', :controller => 'admin/home', :action => 'index'
  map.login '/admin_login', :controller => 'admin/sessions', :action => 'new'
  
  map.namespace :admin do |admin|
    admin.resources :item_categories
    admin.resources :items
    admin.resources :cms, :collection => { :shops => :get }
    admin.resources :users
    admin.resources :shops
    admin.resource :sessions
  end

  #map.connect ':controller/:action/:id'
  #map.connect ':controller/:action/:id.:format'
end
